﻿@using eCollabro.Client.Models.Content;
@using eCollabro.Client.Models.Core;
@using eCollabro.Web.Base;
@model DocumentModel
@if (!Request.IsAjaxRequest())
{
    <script type="text/javascript" src="~/Areas/Content/app/controllers/documentLibrary/dashboardWidget.js"></script>
}
<div id="divDocumentLibraryHome" ng-controller="documentLibraryDashboardWidgetController" ng-init="initialize()">
    <div class="panel panel-default">
        <!-- Default panel contents -->
        <div class="panel-heading"><span ng-click="changeCaption()" data-toggle="collapse" title="expand/collapse" data-target="#collapseDocumentLibrary" class="{{caption}} text-primary"></span> Recently Added Documents <span class="badge">{{recentDocuments.length}}</span></div>
        <div id="collapseDocumentLibrary" class="panel-collapse collapse in">
            <div class="panel-body widget">
                <div id="divSummaryMessageDocumentLibraryWidget"></div>
                <ul class="list-group">
                    <li class="list-group-item" ng-repeat="document in recentDocuments">
                        <p class="list-group-item-heading"><a href="/content/document/document/{{document.DocumentId}}">{{document.DocumentTitle}}</a></p>
                        <p class="list-group-item-text"> {{document.DocumentDescription}}</p>
                    </li>
                </ul>
                <div ng-show="recentDocuments.length==0" class="text-info">There are no records to show.</div>
            </div>
            <div class="panel-footer"><a href="/content/documentlibrary/">Document Library Home</a> | <a href="/content/documentlibrary/documentlibraries">Document Libraries</a></div>
        </div>
</div>
</div>
